﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Net.Mail;
using System.Text;

namespace Wicresoft.Message.Entity
{
    public class Email
    {
        [Key]
        public int EmailId { get; set; }

        [Required]
        public DateTime CreatedTime { get; set; }

        [Required]
        [StringLength(50)]
        public string From { get; set; }

        [Description("邮件接收人，多个人以分号间隔")]
        [Required]
        [StringLength(2500)]
        public string To { get; set; }

        [Description("邮件抄送人，多个人以分号间隔")]
        [StringLength(2500)]
        public string Cc { get; set; }

        [Description("邮件暗送人，多个人以分号间隔")]
        [StringLength(2500)]
        public string Bcc { get; set; }

        [Description("邮件回复人，多个人以分号间隔")]
        [StringLength(2500)]
        public string ReplyTo { get; set; }

        [Required]
        [StringLength(250)]
        public string Subject { get; set; }

        [Required]
        [StringLength(5000)]
        public string Body { get; set; }

        [Required]
        [DefaultValue(false)]
        public bool IsSent { get; set; }

        [Required]
        [DefaultValue(MailPriority.Normal)]
        public int Priority { get; set; }

        public DateTime? SentTime { get; set; }
    }
}
